<f:view
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>
	<ui:decorate template="/facelets/template/mainTemplate.xhtml">
		<ui:define name="title">#{departmentBundle.specialityList}</ui:define>
		<ui:define name="center">
			<ui:decorate template="/facelets/template/centerTemplate.xhtml">
				<ui:define name="content">
					<h:messages/>
					<ui:decorate template="/facelets/template/scrollableTableTemplate.xhtml">
						<ui:param name="actionBean" value="#{specialityBean}"/>
						<ui:param name="idPrefix" value="speciality"/>
						<ui:define name="editPanelContext">
							<h:panelGrid columns="3">
								<h:outputText value="#{dictionaryBundle.dictionaryCode}"
											  rendered="#{not specialityBean.record.new}"/>
								<h:outputText value="#{specialityBean.record.code}"
											  rendered="#{not specialityBean.record.new}"/>
								<rich:spacer/>

								<h:outputText value="#{departmentBundle.faculty}" styleClass="requiredField"/>
								<itdep:entitySelectMenu value="#{specialityBean.record.faculty}" entityType="faculty"
														format="{i18n.fullName}"
														required="true" styleClass="sizeCopmonent"/>
								<rich:spacer/>

								<h:outputText value="#{departmentBundle.fullName}"/>
								<h:inputText value="#{specialityBean.record.translations.fullName.value}"
											 id="specialityFullName" styleClass="sizeCopmonent"/>
								<itdep:errorMessage for="specialityFullName"/>

								<h:outputText value="#{departmentBundle.shortName}"/>
								<h:inputText value="#{specialityBean.record.translations.shortName.value}"
											 id="specialityShortName" styleClass="sizeCopmonent"/>
								<itdep:errorMessage for="specialityShortName"/>

								<h:outputText value="#{departmentBundle.studyYears}"/>
								<h:inputText value="#{specialityBean.record.years}" id="specialityStudyYears"
											 styleClass="sizeCopmonent"/>
								<itdep:errorMessage for="specialityStudyYears"/>

								<h:outputText value="#{departmentBundle.educationForm}" styleClass="requiredField"/>
								<itdep:entitySelectMenu value="#{specialityBean.record.educationForm}"
														entityType="education-form" format="{i18n.description}"
														required="true" styleClass="sizeCopmonent"/>
								<rich:spacer/>

								<h:outputText value="#{departmentBundle.code}"/>
								<h:inputText value="#{specialityBean.record.specialityCode}" id="specialityCode"
											 styleClass="sizeCopmonent" maxlength="20"/>
								<itdep:errorMessage for="specialityCode"/>

								<h:outputText value="#{departmentBundle.coding}"/>
								<h:inputText value="#{specialityBean.record.specialityCoding}" id="specialityCoding"
											 styleClass="sizeCopmonent" maxlength="20"/>
								<itdep:errorMessage for="specialityCoding"/>

							</h:panelGrid>
						</ui:define>

						<ui:define name="tableContext">
							<rich:column>
								<f:facet name="header"><h:outputText value="#{dictionaryBundle.id}"/></f:facet>
								<h:outputText value="#{record.id}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{dictionaryBundle.dictionaryCode}"/></f:facet>
								<h:outputText value="#{record.code}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{departmentBundle.faculty} (#{specialityBean.translationBean.locale})"/></f:facet>
								<itdep:entityOutput value="#{record.faculty}" format="{i18n.fullName}"
													locale="#{specialityBean.translationBean.locale}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{departmentBundle.shortName} (#{specialityBean.translationBean.locale})"/></f:facet>
								<itdep:entityOutput value="#{record}" format="{i18n.shortName}"
													locale="#{specialityBean.translationBean.locale}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{departmentBundle.fullName} (#{specialityBean.translationBean.locale})"/></f:facet>
								<itdep:entityOutput value="#{record}" format="{i18n.fullName}"
													locale="#{specialityBean.translationBean.locale}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText value="#{departmentBundle.studyYears}"/></f:facet>
								<h:outputText value="#{record.years}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{departmentBundle.educationForm} (#{specialityBean.translationBean.locale})"/></f:facet>
								<itdep:entityOutput value="#{record.educationForm}" format="{i18n.description}"
													locale="#{specialityBean.translationBean.locale}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText value="#{departmentBundle.code}"/></f:facet>
								<h:outputText value="#{record.specialityCode}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText value="#{departmentBundle.coding}"/></f:facet>
								<h:outputText value="#{record.specialityCoding}"/>
							</rich:column>
						</ui:define>
					</ui:decorate>
				</ui:define>
			</ui:decorate>
		</ui:define>
	</ui:decorate>
</f:view>